home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / autocomplete / nsIAutoCompleteResult.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-05-08  |  7.9 KB  |  226 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIAutoCompleteResult.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIAutoCompleteResult_h__
  6. #define __gen_nsIAutoCompleteResult_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17.  
  18. /* starting interface:    nsIAutoCompleteResult */
  19. #define NS_IAUTOCOMPLETERESULT_IID_STR "eb43e1dc-2060-4d8e-aebf-3efec4e21cf8"
  20.  
  21. #define NS_IAUTOCOMPLETERESULT_IID \
  22.   {0xeb43e1dc, 0x2060, 0x4d8e, \
  23.     { 0xae, 0xbf, 0x3e, 0xfe, 0xc4, 0xe2, 0x1c, 0xf8 }}
  24.  
  25. class NS_NO_VTABLE nsIAutoCompleteResult : public nsISupports {
  26.  public: 
  27.  
  28.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IAUTOCOMPLETERESULT_IID)
  29.  
  30.   /**
  31.    * Possible values for the searchResult attribute
  32.    */
  33.   enum { RESULT_IGNORED = 1U };
  34.  
  35.   enum { RESULT_FAILURE = 2U };
  36.  
  37.   enum { RESULT_NOMATCH = 3U };
  38.  
  39.   enum { RESULT_SUCCESS = 4U };
  40.  
  41.   /**
  42.    * The original search string
  43.    */
  44.   /* readonly attribute AString searchString; */
  45.   NS_IMETHOD GetSearchString(nsAString & aSearchString) = 0;
  46.  
  47.   /**
  48.    * The result of the search
  49.    */
  50.   /* readonly attribute unsigned short searchResult; */
  51.   NS_IMETHOD GetSearchResult(PRUint16 *aSearchResult) = 0;
  52.  
  53.   /**
  54.    * Index of the default item that should be entered if none is selected
  55.    */
  56.   /* readonly attribute long defaultIndex; */
  57.   NS_IMETHOD GetDefaultIndex(PRInt32 *aDefaultIndex) = 0;
  58.  
  59.   /**
  60.    * A string describing the cause of a search failure
  61.    */
  62.   /* readonly attribute AString errorDescription; */
  63.   NS_IMETHOD GetErrorDescription(nsAString & aErrorDescription) = 0;
  64.  
  65.   /**
  66.    * The number of matches
  67.    */
  68.   /* readonly attribute unsigned long matchCount; */
  69.   NS_IMETHOD GetMatchCount(PRUint32 *aMatchCount) = 0;
  70.  
  71.   /**
  72.    * Get the value of the result at the given index
  73.    */
  74.   /* AString getValueAt (in long index); */
  75.   NS_IMETHOD GetValueAt(PRInt32 index, nsAString & _retval) = 0;
  76.  
  77.   /**
  78.    * Get the comment of the result at the given index
  79.    */
  80.   /* AString getCommentAt (in long index); */
  81.   NS_IMETHOD GetCommentAt(PRInt32 index, nsAString & _retval) = 0;
  82.  
  83.   /**
  84.    * Get the style hint for the result at the given index
  85.    */
  86.   /* AString getStyleAt (in long index); */
  87.   NS_IMETHOD GetStyleAt(PRInt32 index, nsAString & _retval) = 0;
  88.  
  89.   /**
  90.    * Remove the value at the given index from the autocomplete results.
  91.    * If removeFromDb is set to true, the value should be removed from
  92.    * persistent storage as well.
  93.    */
  94.   /* void removeValueAt (in long rowIndex, in boolean removeFromDb); */
  95.   NS_IMETHOD RemoveValueAt(PRInt32 rowIndex, PRBool removeFromDb) = 0;
  96.  
  97. };
  98.  
  99. /* Use this macro when declaring classes that implement this interface. */
  100. #define NS_DECL_NSIAUTOCOMPLETERESULT \
  101.   NS_IMETHOD GetSearchString(nsAString & aSearchString); \
  102.   NS_IMETHOD GetSearchResult(PRUint16 *aSearchResult); \
  103.   NS_IMETHOD GetDefaultIndex(PRInt32 *aDefaultIndex); \
  104.   NS_IMETHOD GetErrorDescription(nsAString & aErrorDescription); \
  105.   NS_IMETHOD GetMatchCount(PRUint32 *aMatchCount); \
  106.   NS_IMETHOD GetValueAt(PRInt32 index, nsAString & _retval); \
  107.   NS_IMETHOD GetCommentAt(PRInt32 index, nsAString & _retval); \
  108.   NS_IMETHOD GetStyleAt(PRInt32 index, nsAString & _retval); \
  109.   NS_IMETHOD RemoveValueAt(PRInt32 rowIndex, PRBool removeFromDb); 
  110.  
  111. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  112. #define NS_FORWARD_NSIAUTOCOMPLETERESULT(_to) \
  113.   NS_IMETHOD GetSearchString(nsAString & aSearchString) { return _to GetSearchString(aSearchString); } \
  114.   NS_IMETHOD GetSearchResult(PRUint16 *aSearchResult) { return _to GetSearchResult(aSearchResult); } \
  115.   NS_IMETHOD GetDefaultIndex(PRInt32 *aDefaultIndex) { return _to GetDefaultIndex(aDefaultIndex); } \
  116.   NS_IMETHOD GetErrorDescription(nsAString & aErrorDescription) { return _to GetErrorDescription(aErrorDescription); } \
  117.   NS_IMETHOD GetMatchCount(PRUint32 *aMatchCount) { return _to GetMatchCount(aMatchCount); } \
  118.   NS_IMETHOD GetValueAt(PRInt32 index, nsAString & _retval) { return _to GetValueAt(index, _retval); } \
  119.   NS_IMETHOD GetCommentAt(PRInt32 index, nsAString & _retval) { return _to GetCommentAt(index, _retval); } \
  120.   NS_IMETHOD GetStyleAt(PRInt32 index, nsAString & _retval) { return _to GetStyleAt(index, _retval); } \
  121.   NS_IMETHOD RemoveValueAt(PRInt32 rowIndex, PRBool removeFromDb) { return _to RemoveValueAt(rowIndex, removeFromDb); } 
  122.  
  123. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  124. #define NS_FORWARD_SAFE_NSIAUTOCOMPLETERESULT(_to) \
  125.   NS_IMETHOD GetSearchString(nsAString & aSearchString) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSearchString(aSearchString); } \
  126.   NS_IMETHOD GetSearchResult(PRUint16 *aSearchResult) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSearchResult(aSearchResult); } \
  127.   NS_IMETHOD GetDefaultIndex(PRInt32 *aDefaultIndex) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultIndex(aDefaultIndex); } \
  128.   NS_IMETHOD GetErrorDescription(nsAString & aErrorDescription) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetErrorDescription(aErrorDescription); } \
  129.   NS_IMETHOD GetMatchCount(PRUint32 *aMatchCount) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMatchCount(aMatchCount); } \
  130.   NS_IMETHOD GetValueAt(PRInt32 index, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValueAt(index, _retval); } \
  131.   NS_IMETHOD GetCommentAt(PRInt32 index, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCommentAt(index, _retval); } \
  132.   NS_IMETHOD GetStyleAt(PRInt32 index, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStyleAt(index, _retval); } \
  133.   NS_IMETHOD RemoveValueAt(PRInt32 rowIndex, PRBool removeFromDb) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveValueAt(rowIndex, removeFromDb); } 
  134.  
  135. #if 0
  136. /* Use the code below as a template for the implementation class for this interface. */
  137.  
  138. /* Header file */
  139. class nsAutoCompleteResult : public nsIAutoCompleteResult
  140. {
  141. public:
  142.   NS_DECL_ISUPPORTS
  143.   NS_DECL_NSIAUTOCOMPLETERESULT
  144.  
  145.   nsAutoCompleteResult();
  146.  
  147. private:
  148.   ~nsAutoCompleteResult();
  149.  
  150. protected:
  151.   /* additional members */
  152. };
  153.  
  154. /* Implementation file */
  155. NS_IMPL_ISUPPORTS1(nsAutoCompleteResult, nsIAutoCompleteResult)
  156.  
  157. nsAutoCompleteResult::nsAutoCompleteResult()
  158. {
  159.   /* member initializers and constructor code */
  160. }
  161.  
  162. nsAutoCompleteResult::~nsAutoCompleteResult()
  163. {
  164.   /* destructor code */
  165. }
  166.  
  167. /* readonly attribute AString searchString; */
  168. NS_IMETHODIMP nsAutoCompleteResult::GetSearchString(nsAString & aSearchString)
  169. {
  170.     return NS_ERROR_NOT_IMPLEMENTED;
  171. }
  172.  
  173. /* readonly attribute unsigned short searchResult; */
  174. NS_IMETHODIMP nsAutoCompleteResult::GetSearchResult(PRUint16 *aSearchResult)
  175. {
  176.     return NS_ERROR_NOT_IMPLEMENTED;
  177. }
  178.  
  179. /* readonly attribute long defaultIndex; */
  180. NS_IMETHODIMP nsAutoCompleteResult::GetDefaultIndex(PRInt32 *aDefaultIndex)
  181. {
  182.     return NS_ERROR_NOT_IMPLEMENTED;
  183. }
  184.  
  185. /* readonly attribute AString errorDescription; */
  186. NS_IMETHODIMP nsAutoCompleteResult::GetErrorDescription(nsAString & aErrorDescription)
  187. {
  188.     return NS_ERROR_NOT_IMPLEMENTED;
  189. }
  190.  
  191. /* readonly attribute unsigned long matchCount; */
  192. NS_IMETHODIMP nsAutoCompleteResult::GetMatchCount(PRUint32 *aMatchCount)
  193. {
  194.     return NS_ERROR_NOT_IMPLEMENTED;
  195. }
  196.  
  197. /* AString getValueAt (in long index); */
  198. NS_IMETHODIMP nsAutoCompleteResult::GetValueAt(PRInt32 index, nsAString & _retval)
  199. {
  200.     return NS_ERROR_NOT_IMPLEMENTED;
  201. }
  202.  
  203. /* AString getCommentAt (in long index); */
  204. NS_IMETHODIMP nsAutoCompleteResult::GetCommentAt(PRInt32 index, nsAString & _retval)
  205. {
  206.     return NS_ERROR_NOT_IMPLEMENTED;
  207. }
  208.  
  209. /* AString getStyleAt (in long index); */
  210. NS_IMETHODIMP nsAutoCompleteResult::GetStyleAt(PRInt32 index, nsAString & _retval)
  211. {
  212.     return NS_ERROR_NOT_IMPLEMENTED;
  213. }
  214.  
  215. /* void removeValueAt (in long rowIndex, in boolean removeFromDb); */
  216. NS_IMETHODIMP nsAutoCompleteResult::RemoveValueAt(PRInt32 rowIndex, PRBool removeFromDb)
  217. {
  218.     return NS_ERROR_NOT_IMPLEMENTED;
  219. }
  220.  
  221. /* End of implementation class template. */
  222. #endif
  223.  
  224.  
  225. #endif /* __gen_nsIAutoCompleteResult_h__ */
  226.